//利用newObject创建对象

// var obj = new Object();//
// obj.uname ='鸣人';
// obj.age=19;//用obj附一个值
// obj.sex='男';
// obj.skillMotion = function(){
//     console.log(分身);
// }
// console.log(obj.uname);
// console.log(obj['sex']);
// obj.skillMotion();

//利用this构造函数
function Obj (uname,age,sex){
    this.name = uname;
    this.age = age;
    this.sex = sex;
    this.skill = function(){
        console.log();
    }
}

var hy = new Obj(后裔,属性,'男');
console.log(hy.name);
console.log(hy['sex']);
hy.skill();
var hy = new Obj(廉颇,20,'男');
console.log(hy.name);
console.log(hy['sex']);
hy.skill();
